package com.lagou.mall.esflow.server.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class EnvConfig {

    @Value("${profiles.active}")
    private String env;


    public boolean isDev() {
        return env.equals("dev");
    }

    public boolean isTest() {
        return env.equals("test");
    }

    public boolean isSit() {
        return env.equals("sit");
    }

    public boolean isPre() {
        return env.equals("pre");
    }

    public boolean isProd() {
        return env.equals("prod");
    }

    public String getEnv() {
        return env;
    }

    public void setEnv(String env) {
        this.env = env;
    }
}
